[package]
name = "{{{packageName}}}"
version = "{{{packageVersion}}}"
{{#infoEmail}}
authors = ["{{{.}}}"]
{{/infoEmail}}
{{^infoEmail}}
authors = ["OpenAPI Generator team and contributors"]
{{/infoEmail}}
{{#appDescription}}
description = "{{{.}}}"
{{/appDescription}}
{{#licenseInfo}}
license = "{{.}}"
{{/licenseInfo}}
{{^licenseInfo}}
# Override this license by providing a License Object in the OpenAPI.
license = "Unlicense"
{{/licenseInfo}}
edition = "2018"
{{#publishRustRegistry}}
publish = ["{{.}}"]
{{/publishRustRegistry}}
{{#repositoryUrl}}
repository = "{{.}}"
{{/repositoryUrl}}
{{#documentationUrl}}
documentation = "{{.}}"
{{/documentationUrl}}
{{#homePageUrl}}
homepage = "{{.}}"
{{/homePageUrl}}

[features]
default = ["client", "server"]
client = [
{{#apiUsesMultipartFormData}}
    "multipart", "multipart/client", "swagger/multipart_form",
{{/apiUsesMultipartFormData}}
{{#apiUsesMultipartRelated}}
    "mime_multipart", "swagger/multipart_related",
{{/apiUsesMultipartRelated}}
{{#usesUrlEncodedForm}}
    "serde_urlencoded",
{{/usesUrlEncodedForm}}
{{#hasCallbacks}}
    "serde_ignored", "percent-encoding", {{^apiUsesByteArray}}"lazy_static", "regex",{{/apiUsesByteArray}}
{{/hasCallbacks}}
{{! Anything added to the list below, should probably be added to the callbacks list below }}
    "hyper", "hyper-util/http1", "hyper-util/http2", "hyper-openssl", "hyper-tls", "native-tls", "openssl", "url"
]
server = [
{{#apiUsesMultipartFormData}}
    "multipart", "multipart/server", "swagger/multipart_form",
{{/apiUsesMultipartFormData}}
{{#apiUsesMultipartRelated}}
    "mime_multipart", "swagger/multipart_related",
{{/apiUsesMultipartRelated}}
{{#hasCallbacks}}
    "native-tls", "hyper-openssl", "hyper-tls", "openssl",
{{/hasCallbacks}}
{{! Anything added to the list below, should probably be added to the callbacks list above }}
   "serde_ignored", "hyper", "percent-encoding", "url",
   {{^apiUsesByteArray}}"lazy_static", "regex"{{/apiUsesByteArray}}
]
cli = [
{{#apiHasDeleteMethods}}
  "dialoguer",
{{/apiHasDeleteMethods}}
  "anyhow", "clap", "clap-verbosity-flag", "simple_logger", "tokio"
]
conversion = ["frunk", "frunk_derives", "frunk_core", "frunk-enum-core", "frunk-enum-derive"]

mock = ["mockall"]

[target.'cfg(any(target_os = "macos", target_os = "windows", target_os = "ios"))'.dependencies]
native-tls = { version = "0.2", optional = true }
hyper-tls = { version = "0.6", optional = true }

[target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dependencies]
hyper-openssl = { version = "0.10", optional = true }
openssl = { version = "0.10", optional = true }

[dependencies]
# Common
async-trait = "0.1.88"
chrono = { version = "0.4", features = ["serde"] }
futures = "0.3"
swagger = { version = "7.0.0", features = ["serdejson", "server", "client", "tls"] }
headers = "0.4.0"
log = "0.4.27"

mime = "0.3"
mockall = { version = "0.13.1", optional = true }
{{#apiUsesByteArray}}
lazy_static = "1.5"
regex = "1.12"
{{/apiUsesByteArray}}


serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
validator = { version = "0.20", features = ["derive"] }

# Crates included if required by the API definition
{{#usesXml}}
serde-xml-rs = "0.8"
{{/usesXml}}
{{#apiUsesMultipartFormData}}
multipart = { version = "0.18", default-features = false, optional = true }
{{/apiUsesMultipartFormData}}
{{#apiUsesUuid}}
uuid = { version = "1.18.0", features = ["serde", "v4"]}
{{/apiUsesUuid}}

# Common between server and client features
bytes = "1.11"
http-body-util = "0.1.3"
hyper = { version = "1.6", features = ["full"], optional = true }
hyper-util = { version = "0.1.17", features = ["service"] }
{{#apiUsesMultipartRelated}}
mime_multipart = { version = "0.10", optional = true, package = "mime-multipart-hyper1" }
{{/apiUsesMultipartRelated}}
serde_ignored = { version = "0.1.14", optional = true }
url = { version = "2.5", optional = true }

# Client-specific
{{#usesUrlEncodedForm}}
serde_urlencoded = { version = "0.7.1", optional = true }
{{/usesUrlEncodedForm}}
tower-service = "0.3.3"

# Server, and client callback-specific
{{^apiUsesByteArray}}
lazy_static = { version = "1.5", optional = true }
regex = { version = "1.12", optional = true }
{{/apiUsesByteArray}}
percent-encoding = { version = "2.3.1", optional = true }

# CLI-specific
anyhow = { version = "1", optional = true }
clap = { version = "4.5", features = ["env"], optional = true }
clap-verbosity-flag = { version = "3.0", optional = true }
simple_logger = { version = "5.0", features = ["stderr"], optional = true }
tokio = { version = "1.48", features = ["rt-multi-thread", "macros"], optional = true }
{{#apiHasDeleteMethods}}
dialoguer = { version = "0.12", optional = true }
{{/apiHasDeleteMethods}}

# Conversion
frunk = { version = "0.4.3", optional = true }
frunk_derives = { version = "0.4.3", optional = true }
frunk_core = { version = "0.4.3", optional = true }
frunk-enum-derive = { version = "0.3.0", optional = true }
frunk-enum-core = { version = "0.3.0", optional = true }

[dev-dependencies]
always_send = "0.1.1"
clap = "4.5"
env_logger = "0.11"
tokio = { version = "1.48", features = ["full"] }
native-tls = "0.2"
pin-project = "1.1.10"

# Bearer authentication, used in examples
jsonwebtoken = "9.3.1"

[target.'cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))'.dev-dependencies]
tokio-openssl = "0.6"
openssl = "0.10"

[[example]]
name = "client"
required-features = ["client"]

[[example]]
name = "server"
required-features = ["server"]

[[bin]]
name = "{{{packageName}}}"
path = "bin/cli.rs"
required-features = ["client", "cli"]
